package com.easyaccount.controller;

import com.alibaba.fastjson.JSON;
import com.easyaccount.commons.CommonResp;
import com.easyaccount.commons.Constant;
import com.easyaccount.commons.TablePage;
import com.easyaccount.model.*;
import com.easyaccount.service.BillInfoService;
import com.easyaccount.service.BillService;
import com.easyaccount.service.DailyService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;

@RequestMapping("billInfo")
@Controller
public class BillInfoController {

    @Resource
    private BillInfoService billInfoService;


    @RequestMapping("commited")
    public String commited(){
        return "/bzinfo/commited";
    }
    @RequestMapping("unchecked")
    public String unchecked(){
        return "/bzinfo/unchecked";
    }

    @RequestMapping("commited/list")
    @ResponseBody
    public TablePage commitedList(TablePage tablePage,HttpServletRequest request){
        return billInfoService.getCommitBillPage(tablePage,request);
    }

    @RequestMapping("uncheck/list")
    @ResponseBody
    public TablePage uncheckList(TablePage tablePage,HttpServletRequest request){
        return billInfoService.getUnCheckBillPage(tablePage,request);
    }

    @RequestMapping("checked/list")
    @ResponseBody
    public TablePage checkedList(TablePage tablePage,HttpServletRequest request){
        return billInfoService.getCheckedBillPage(tablePage,request);
    }
}
